//数组的基本查找
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import org.w3c.dom.ls.LSOutput;

import java.sql.SQLOutput;
import java.util.Scanner;
public class test_01 {
    public static void main(String[] args) {
        int [] arr = {55, 44, 11, 33, 66, 22};
        int index = getIndex(33,arr);
        System.out.println(index);
    }
    public static int getIndex(int key, int [] arr){
        for(int i = 0;i < arr.length;i++){
            if(key== arr[i]){
                return i;
            }
        }
        return  -1;
    }
}
